<template lang="pug">
  el-drawer.commonDrawer(
    title="线索跟进"
    :visible="visibleDialog"
    append-to-body
    destroy-on-close
    direction="rtl"
    size="640px"
    wrapperClosable
    @close="$_handleCancel"
  )
    .drawer-content
      form-box(
        ref="form"
        :fields="fields"
        :showBtns="false"
        :layoutCol="{ xs: 12, md: 12, lg: 12 }"
      )
    .drawer-footer.tr
      el-button(size="small" type="primary" :loading="submitting" @click="submitHandle") 确定
</template>
<script>
export default {
  props: {
    visible: {
      type: Boolean,
      default: false
    }
  },
  data () {
    return {
      submitting: false
    }
  },
  computed: {
    ...mapGetters(['curArea']),
    visibleDialog: {
      get () {
        return this.visible
      },
      set (val) {
        this.$emit('update:visible', val)
      }
    }
  },
  methods: {
    $_handleCancel () {
      this.visibleDialog = false
    }
  }
}
</script>
